package com.hsc.yalebao.newui;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import com.hsc.yalebao.base.BaseFragment;
import com.hsc.yalebao.base.CustomApplication;
import com.hsc.yalebao.db.DatabaseHelper;
import com.hsc.yalebao.tools.IOHelper;
import com.hsc.yalebao.tools.UiUtil;
import com.hsc.yalebao.weight.LogUtils;
import com.hsc.yalebao.weight.MyDialog1;
import com.hsc.yalebao.weight.RoundImageView;
import java.io.File;
import java.text.DecimalFormat;
import java.text.NumberFormat;

@SuppressLint({"NewApi"})
public class NewuiMineFragment extends BaseFragment
  implements View.OnClickListener
{
  public static NewuiMineFragment fragment;
  private String TAG = "MineFragment";
  private File cacheDir;
  private String cacheSize = "";
  private View contentView;
  private int group_Id;
  private String guid = "";
  int imgRight = 8;
  private ImageView img_edit_data;
  public RoundImageView img_photo;
  private LinearLayout lin_personal_info;
  private LinearLayout lin_user_data;
  private LinearLayout ll_about;
  private LinearLayout ll_bq;
  private LinearLayout ll_clean_cache;
  private LinearLayout ll_daili_houtai;
  private LinearLayout ll_daili_kaihu;
  private LinearLayout ll_fx;
  private LinearLayout ll_huishui;
  private LinearLayout ll_jl;
  private LinearLayout ll_kefu_qq;
  private LinearLayout ll_kefu_weixin;
  private LinearLayout ll_myget;
  private LinearLayout ll_qb;
  private LinearLayout ll_set;
  private LinearLayout ll_tongji;
  private LinearLayout ll_update;
  private LinearLayout ll_vip_fx;
  private LinearLayout ll_wf;
  private LinearLayout ll_zb;
  private int memberId;
  private MyDialog1 myDialog1;
  private TextView text_ge_xian;
  private TextView text_user_name;
  public TextView txt_money_left;

  private void closeWindowSoftInput()
  {
    InputMethodManager localInputMethodManager = (InputMethodManager)getActivity().getSystemService("input_method");
    boolean bool = localInputMethodManager.isActive();
    LogUtils.d("-MianWebActivity-", "isSoftActive：" + bool);
    if (bool)
    {
      localInputMethodManager.hideSoftInputFromWindow(this.contentView.getApplicationWindowToken(), 0);
      LogUtils.d(this.TAG, "强制隐藏键盘");
    }
  }

  private void totalCacheSize()
  {
    long l = IOHelper.totalFileSize(this.cacheDir);
    this.cacheSize = new DecimalFormat("#,##0.00").format(l / 1048576.0D);
  }

  public void init()
  {
    this.lin_personal_info = ((LinearLayout)this.contentView.findViewById(2131100068));
    this.img_photo = ((RoundImageView)this.contentView.findViewById(2131100043));
    this.img_photo.setOnClickListener(this);
    this.text_user_name = ((TextView)this.contentView.findViewById(2131100071));
    this.txt_money_left = ((TextView)this.contentView.findViewById(2131099926));
    LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams(-1, CustomApplication.app.getScreenSize().heightPixels / 4);
    this.lin_personal_info.setLayoutParams(localLayoutParams);
    this.lin_user_data = ((LinearLayout)this.contentView.findViewById(2131100069));
    this.img_edit_data = ((ImageView)this.contentView.findViewById(2131100114));
    this.ll_tongji = ((LinearLayout)this.contentView.findViewById(2131100118));
    this.ll_tongji.setVisibility(8);
    this.ll_set = ((LinearLayout)this.contentView.findViewById(2131100128));
    this.ll_qb = ((LinearLayout)this.contentView.findViewById(2131100115));
    this.ll_wf = ((LinearLayout)this.contentView.findViewById(2131100122));
    this.ll_about = ((LinearLayout)this.contentView.findViewById(2131100129));
    this.ll_wf.setVisibility(8);
    this.ll_bq = ((LinearLayout)this.contentView.findViewById(2131100127));
    this.ll_huishui = ((LinearLayout)this.contentView.findViewById(2131100116));
    this.ll_jl = ((LinearLayout)this.contentView.findViewById(2131100120));
    this.ll_myget = ((LinearLayout)this.contentView.findViewById(2131100124));
    this.ll_zb = ((LinearLayout)this.contentView.findViewById(2131100119));
    this.ll_fx = ((LinearLayout)this.contentView.findViewById(2131100121));
    this.ll_vip_fx = ((LinearLayout)this.contentView.findViewById(2131100123));
    this.ll_daili_kaihu = ((LinearLayout)this.contentView.findViewById(2131100125));
    this.ll_daili_houtai = ((LinearLayout)this.contentView.findViewById(2131100126));
    this.ll_kefu_qq = ((LinearLayout)this.contentView.findViewById(2131100327));
    this.ll_kefu_weixin = ((LinearLayout)this.contentView.findViewById(2131100328));
    this.ll_update = ((LinearLayout)this.contentView.findViewById(2131100329));
    this.ll_clean_cache = ((LinearLayout)this.contentView.findViewById(2131100330));
    this.ll_kefu_qq.setOnClickListener(this);
    this.ll_kefu_weixin.setOnClickListener(this);
    this.ll_update.setOnClickListener(this);
    this.ll_clean_cache.setOnClickListener(this);
    this.lin_personal_info.setOnClickListener(this);
    this.ll_daili_houtai.setOnClickListener(this);
    this.lin_user_data.setOnClickListener(this);
    this.img_edit_data.setOnClickListener(this);
    this.ll_tongji.setOnClickListener(this);
    this.ll_set.setOnClickListener(this);
    this.ll_qb.setOnClickListener(this);
    this.ll_wf.setOnClickListener(this);
    this.ll_bq.setOnClickListener(this);
    this.ll_huishui.setOnClickListener(this);
    this.ll_jl.setOnClickListener(this);
    this.ll_about.setOnClickListener(this);
    this.ll_zb.setOnClickListener(this);
    this.ll_fx.setOnClickListener(this);
    this.ll_myget.setOnClickListener(this);
    this.ll_daili_kaihu.setOnClickListener(this);
    this.ll_vip_fx.setOnClickListener(this);
    this.cacheDir = new File(DatabaseHelper.CACHE_DIR);
    totalCacheSize();
  }

  public void onActivityCreated(Bundle paramBundle)
  {
    super.onActivityCreated(paramBundle);
  }

  public void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    case 2131100043:
    default:
      return;
    case 2131100329:
      UiUtil.showToast(getActivity(), "当前已是最新版本");
      return;
    case 2131100330:
    }
    IOHelper.deleteAllFiles(this.cacheDir);
    this.myDialog1.setMessage("已清除缓存" + this.cacheSize + "M");
    if ((this.myDialog1 != null) && (!this.myDialog1.isShowing()))
      this.myDialog1.show();
    this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        NewuiMineFragment.this.myDialog1.dismiss();
      }
    });
    totalCacheSize();
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    fragment = this;
    this.myDialog1 = new MyDialog1(getActivity());
  }

  public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
  {
    this.contentView = paramLayoutInflater.inflate(2130903208, null);
    init();
    setTitle(8, 8, 0, "关于", 0, 8, 8, 0, true);
    return this.contentView;
  }

  public void onDestroy()
  {
    super.onDestroy();
    closeWindowSoftInput();
  }

  public void onResume()
  {
    super.onResume();
  }

  @SuppressLint({"NewApi"})
  public void setTitle(int paramInt1, int paramInt2, int paramInt3, String paramString, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean)
  {
    View localView = this.contentView.findViewById(2131099716);
    if (paramBoolean)
      localView.setVisibility(0);
    while (true)
    {
      ((TextView)localView.findViewById(2131099701)).setText(paramString);
      ((TextView)localView.findViewById(2131099700)).setVisibility(paramInt1);
      ImageView localImageView1 = (ImageView)localView.findViewById(2131099699);
      localImageView1.setVisibility(paramInt2);
      localImageView1.setImageResource(paramInt3);
      ((TextView)localView.findViewById(2131099702)).setVisibility(paramInt5);
      ImageView localImageView2 = (ImageView)localView.findViewById(2131099704);
      localImageView2.setVisibility(paramInt6);
      localImageView2.setImageResource(paramInt7);
      return;
      localView.setVisibility(8);
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.newui.NewuiMineFragment
 * JD-Core Version:    0.6.2
 */